package com.itheima.dao.impl;

import com.itheima.dao.UserDao;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Repository;

@Repository("userDao")
@DependsOn("userService")
//当你这个对应的bean加载的资源是对另一个提供服务的，一定要保证它（userService）先运行，另一个（userDao）再运行。
public class UserDaoImpl implements UserDao {

    public UserDaoImpl(){
        System.out.println("userDaoImpl is running");
    }

    public void save() {
        System.out.println("UserDao is running");
    }
}
